<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    //异步
    //分支代码不会影响主程序执行
    var username = 'zhangsan';
    var age = 20;
    document.onclick = function(){
        alert(age);
    }
    console.log(username);
    //
    var timer = setInterval(function(){
        console.log(new Date());
    },1000);
    var timer2 = new Date();
    console.log(timer2);
</script>
</html>